package com.paomi.client.activity.logistics;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

import com.paomi.client.R;
import com.paomi.client.activity.logistics.adapter.LogisticsListAdapter;
import com.paomi.client.base.BaseMvpActivity;
import com.paomi.client.utils.UIUtils;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by pc on 2019/2/19
 * Describe:物流页面的列表
 * com.paomi.client.activity.logistics
 */
public class LogisticsActivity extends BaseMvpActivity<LogisticsMvpView, LogisticsPresenter> {
    @BindView(R.id.order_id_tv)
    TextView orderIdTv;
    @BindView(R.id.order_time)
    TextView orderTime;
    @BindView(R.id.order_pay)
    TextView orderPay;
    @BindView(R.id.logistics_list)
    RecyclerView logisticsList;
    LogisticsListAdapter listAdapter;
    List<String> getlist=new ArrayList<>();

    @Override
    protected String setTitle() {
        return getResources().getString(R.string.logistics_title);
    }

    @Override
    protected void showBack(TextView button_goback) {
        button_goback.setVisibility(View.VISIBLE);
        button_goback.setTypeface(iconfont);
        button_goback.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
        button_goback.setTextColor(getResources().getColor(R.color.main_color));
        button_goback.setText(getResources().getString(R.string.back_normal) + getResources().getString(R.string.back));
    }

    @NonNull
    @Override
    protected int getLayoutId() {
        return R.layout.activity_logistics;
    }

    @Override
    protected void initEvent() {
        logisticsList.setLayoutManager(UIUtils.getRecyclerViewManager(false,this));
        listAdapter=new LogisticsListAdapter(this,iconfont);
        logisticsList.setAdapter(listAdapter);
        getlist.clear();
        String string1="kdkkdkdkddkdkkkk";
        String string2="kk坎坎坷坷多多扩多扩看看可是算了算了算了算历史抗生素死了理论上";
        String string3="健康快速开始生死已萨斯已WWI已即可打卡打卡打卡 僵尸叔叔搜偶搜所搜搜";
        getlist.add(string1);
        getlist.add(string2);
        getlist.add(string3);
        listAdapter.setData(getlist);
    }

    @NonNull
    @Override
    public LogisticsPresenter createPresenter() {
        return new LogisticsPresenter();
    }
}
